#pragma once
#include "Common.h"
#include "StringHelper.h"

typedef struct _OBJECT_TYPE_INFORMATION {
	UNICODE_STRING TypeName;
	ULONG TotalNumberOfObjects;
	ULONG TotalNumberOfHandles;
	ULONG TotalPagedPoolUsage;
	ULONG TotalNonPagedPoolUsage;
	ULONG TotalNamePoolUsage;
	ULONG TotalHandleTableUsage;
	ULONG HighWaterNumberOfObjects;
	ULONG HighWaterNumberOfHandles;
	ULONG HighWaterPagedPoolUsage;
	ULONG HighWaterNonPagedPoolUsage;
	ULONG HighWaterNamePoolUsage;
	ULONG HighWaterHandleTableUsage;
	ULONG InvalidAttributes;
	GENERIC_MAPPING GenericMapping;
	ULONG ValidAccessMask;
	BOOLEAN SecurityRequired;
	BOOLEAN MaintainHandleCount;
	ULONG PoolType;
	ULONG DefaultPagedPoolCharge;
	ULONG DefaultNonPagedPoolCharge;

} OBJECT_TYPE_INFORMATION, * POBJECT_TYPE_INFORMATION;


typedef enum _OBJECT_INFORMATION_CLASS {

	ObjectTypeInformation = 2,

} OBJECT_INFORMATION_CLASS;

typedef
NTSTATUS(NTAPI* LPFN_NTQUERYOBJECT)(
	IN  HANDLE HandleValue,
	IN  OBJECT_INFORMATION_CLASS ObjectInformationClass,
	OUT PVOID  ObjectInformation,
	IN  ULONG  ObjectInformationLength,
	OUT PULONG ReturnLength OPTIONAL);





extern LPFN_NTQUERYOBJECT __NtQueryObject;



bool SeCloseHandle(HANDLE HandleValue);